package com.dctp.ems.controller;

import com.dctp.common.controller.BaseController;
import com.dctp.common.core.S3PresignedUrlGenerator;
import com.dctp.common.vo.JsonResult;
import com.jfinal.core.Path;

@Path("/config")
public class ConfigController extends BaseController {

    public void getUploadSignUrl() {
        String fileName = getPara("fileName");
        String fileType = getPara("fileType", "image/*"); // 默认文件类型，可以根据实际情况调整
        String signUrl = S3PresignedUrlGenerator.generatePresignedUrl(fileName,fileType);
        renderJson(JsonResult.successWithData(signUrl));
    }
}
